<!DOCTYPE HTML>
<html lang="zh-cn" >
<head>
    <meta charset="UTF-8">
    <title>CSSClasses</title>
    <script src="js/jquery-1.7.2.min.js"></script>
<script src="js/angular.min.js"></script>
<script type="text/javascript">
    function ctrl($http,$scope){
        $scope.login = function(user){
        	alert("aaaa");
            $http.post("login.do",user).success(function(data, status, headers, config){
                alert("success");
            }).error(function(data, status, headers, config){
                alert("error");
            })
        }
        $scope.login1 = function(user){
        	alert("bbbb");
            $http({url:"login.do",data:user}).success(function(data, status, headers, config){
                alert("success");
            }).error(function(data, status, headers, config){
                alert("error");
            })
        }
    }
</script>
</head>
<body ng-app>
    <div ng-controller="ctrl">
        <form name="loginFm">
            Name:<input ng-model="user.name" />
            pwd: <input ng-model="user.pwd" />
            <input type="button" value="login" ng-click="login(user)" />
            <input type="button" value="login1" ng-click="login1(user)" />
        </form>
    </div>

</body>
</html>